import React, { Component } from 'react'
import routerList from '../router/roterList';
import All from './all';
import My from './my';
import Detail from './detail';
import RouterView from '../router/routerView';
import { Route, Switch, NavLink,Redirect } from 'react-router-dom' // 快捷键 imbrc
 class App extends Component {
  render() {
    return (
      <div className='appwrap'>
           {/* Switch可以保证路由匹配到就不往后匹配了，可以理解为精准匹配路由 */}
           {/* <Switch>
                <Route path="/all" component={All}></Route>
                <Route path="/my" component={My}></Route>
                <Route path="/detail/:id" component={Detail}></Route>
                <Redirect from="/" to="/all"></Redirect>
           </Switch> */}
         
         <RouterView RouterList = {routerList}></RouterView>
          

           {/* <Tabbar>
                <Tabbar.Item icon={<HomeO />}>
                    <NavLink to="/movie">电影</NavLink>
                </Tabbar.Item>
                <Tabbar.Item icon={<Search />}>
                     <NavLink to="/video">视频</NavLink>
                </Tabbar.Item>
                <Tabbar.Item icon={<FriendsO />}>
                    <NavLink to="/shortvideo">小视频</NavLink>
                </Tabbar.Item>
            </Tabbar> */}

      </div>
    )
  }
}

export default App